package com.ruoyi.xiaoshou.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.core.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

/**
 * 销售业务员报表对象 finer_saler_total
 *
 * @author wl
 * @date 2024-11-08
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SalesmanReport implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Integer id;

    /**
     * 年份
     */
    @Excel(name = "年份")
    private String year;

    /**
     * 月份
     */
    @Excel(name = "月份")
    private String month;

    /**
     * 销售订单数量
     */
    @Excel(name = "销售订单数量")
    private Integer saleOrderCount;

    /**
     * 业务员
     */
    @Excel(name = "业务员")
    private String userName;

    //业务员id
    private Integer userId;

    /**
     * 业务部门
     */
    @Excel(name = "业务部门")
    private String deptName;

    //业务部门id
    private Integer deptId;

    /**
     * 销售金额
     */
    @Excel(name = "销售金额")
    private BigDecimal saleAmount;

    /**
     * 出库金额
     */
    @Excel(name = "出库金额")
    private BigDecimal outboundAmount;

    /**
     * 已结算金额
     */
    @Excel(name = "已结算金额")
    private BigDecimal settledAmount;

    /**
     * 未结算金额
     */
    @Excel(name = "未结算金额")
    private BigDecimal unsettledAmount;

    /**
     * 毛利润
     */
    @Excel(name = "毛利润")
    private BigDecimal grossProfit;

    /**
     * 毛利率
     */
    @Excel(name = "毛利率")
    private Double grossMargin;
    /**
     * 搜索值
     */
    @JsonIgnore
    private String searchValue;

    /**
     * 请求参数
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;

    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }

}
